﻿using KAs.Application.Contract.Dto;
using KAs.Application.Contract.Svc;

namespace KAs.Application;

public class CurrentUserInfo : ICurrentUserInfo
{
    private UserInfoDto _userInfo;

    public UserInfoDto GetUserInfo()
    {
        return _userInfo;
    }

    public void SetUserInfo(UserInfoDto userInfo)
    {
        _userInfo = userInfo;
    }

    public bool IsAdmin()
    {
        return _userInfo?.IsAdmin ?? false;
    }
}
